package ooExercise.ooday04;
import java.util.Timer;
import java.util.TimerTask;
public class TimerDemo {
    public static void main(String[] args) {
        //创建一个名叫timer对象
        //创建了一个定时器对象
        Timer timer=new Timer();
        int a=100;
        timer.schedule(new TimerTask() {
            @Override
            public void run() {
                System.out.println("发泄一下欲望！！！");
            }
        },a,a);
    }
}
